﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CarRSS.aspx.vb" Inherits="Final_Web_2._0_Site.CarRSS" %>
<%@ Import Namespace="System.Data" %>



<asp:SqlDataSource ID="MercedesSqlDataSource" runat="server" 
    ConnectionString="<%$ ConnectionStrings:Mercedes1ConnectionString %>" 
    ProviderName="<%$ ConnectionStrings:Mercedes1ConnectionString.ProviderName %>" 
    SelectCommand="SELECT [CarModelName], [CarModelYear], [CarID] FROM [Car]">
</asp:SqlDataSource>

<asp:Repeater ID="Repeater1" runat="server" DataSourceID="MercedesSqlDataSource">

<HeaderTemplate>
<rss version="2.0">
 <channel>
  <title>New Mercedes C-Class Car List</title>
   <description>List of latest C-class Cars</description>
</HeaderTemplate>
<ItemTemplate>
    <item>
     <title><%# FormatForXML(DataBinder.Eval(Container.DataItem, "CarModelName"))%></title>
     <link> Detail.aspx?ID=<%# FormatForXML(DataBinder.Eval(Container.DataItem, "CarID"))%></link><description>   Model Year <%# FormatForXML(DataBinder.Eval(Container.DataItem, "CarModelYear"))%>      
        </description>  
    </item>
</ItemTemplate>
<FooterTemplate>
   </channel>
  </rss>
 </FooterTemplate>


</asp:Repeater>

